﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Statistiche.aspx.cs" Inherits="Contents_Statistiche" %>
    <%@ OutputCache Duration="600" Location="Server" VaryByParam="none"  %>

<%@ Register Assembly="Microsoft.Live.ServerControls" Namespace="Microsoft.Live.ServerControls"
    TagPrefix="live" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <br />
    <asp:Chart ID="Chart1" runat="server" DataSourceID="annVenditaSql" Height="296px"
        Width="412px" ImageStorageMode="UseImageLocation" ImageLocation="~/public/chartImg" 
        ImageType="Png" IsMapEnabled="true" Palette="BrightPastel" BorderDashStyle="Solid"
        BackSecondaryColor="White" BackGradientStyle="TopBottom" BorderWidth="2" BackColor="#D3DFF0"
        BorderColor="26, 59, 105">
        <Titles><asp:Title BackColor="Beige" Text="Annunci vendita"></asp:Title> </Titles>
        <Series>
            <asp:Series Name="Tot. per Marca" XValueMember="marca" YValueMembers="Column1" ChartType="Column" IsValueShownAsLabel="true">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea BackColor="Yellow" BackGradientStyle="LeftRight" Name="ChartArea1"
                ShadowOffset="5" >               
                <AxisX Title="Marche" IsLabelAutoFit="True">
                </AxisX>
                <AxisY Title="Tot." IsLabelAutoFit="true"></AxisY>  
                <Area3DStyle Enable3D="True" />
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    <br />
    <%--<asp:Chart ID="Chart2" runat="server" DataSourceID="annAcquistoSql" Height="296px"
        Width="412px" ImageStorageMode="UseImageLocation" ImageLocation="~/public/chartImg"
        ImageType="Png" IsMapEnabled="true" Palette="BrightPastel" BorderDashStyle="Solid"
        BackSecondaryColor="White" BackGradientStyle="TopBottom" BorderWidth="2" BackColor="#D3DFF0"
        BorderColor="26, 59, 105">
        <Titles>
            <asp:Title BackColor="Beige" Text="Annunci acquisto">
                 </asp:Title>
        </Titles>
        <Series>
            <asp:Series Name="Cat Merc" XValueMember="marca" YValueMembers="Column1" ChartType="Column">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea BackColor="Yellow" BackGradientStyle="LeftRight" Name="ChartArea1"
                ShadowOffset="5">
                <AxisY Title="Cat merc.">
                </AxisY>
                <AxisX Title="Cat" IsLabelAutoFit="True">
                    <LabelStyle Angle="-90" Interval="1" />
                </AxisX>
                <Area3DStyle Enable3D="True" />
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>--%>
    
    <asp:SqlDataSource ID="annVenditaSql" runat="server" ConnectionString="<%$ ConnectionStrings:baseConnectionString %>"
        SelectCommand="SELECT COUNT(*),marca FROM [vAnnVendita] group by Marca">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="annAcquistoSql" runat="server" ConnectionString="<%$ ConnectionStrings:baseConnectionString %>"
        SelectCommand="SELECT COUNT(*),marca FROM [vAnnAcquisto] group by Marca"></asp:SqlDataSource>
</asp:Content>
